/*
* 打开一个不存在的路由页面的解决方案：跳转到一个统一的错误页面
* */

import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyAnimPage(),
      routes:{},
      onUnknownRoute: (RouteSettings settings){
        return MaterialPageRoute(
            builder: (context) => UnknownPage();
        );
      },
    );
  }
}